import 'package:flutter/material.dart';

class PrimaryButton extends StatelessWidget {
  final String text;
  final EdgeInsetsGeometry margin;
  final VoidCallback onPressed;
  final double height;

  const PrimaryButton(
    this.text, {
    Key key,
    this.margin,
    @required this.onPressed,
    this.height,
  }) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return SafeArea(
      child: Container(
        margin: margin ?? EdgeInsets.all(16),
        height: height ?? 54,
        child: ElevatedButton(
          style: ElevatedButton.styleFrom(shadowColor: Colors.transparent),
          child: Text(
            text,
            style: TextStyle(fontSize: 16),
          ),
          onPressed: onPressed,
        ),
      ),
    );
  }
}
